<%--
  Created by IntelliJ IDEA.
  User: 吃三明治派对中的康康
  Date: 2021/12/27
  Time: 17:55
  To change this template use File | Settings | File Templates.
--%>
<%@page pageEncoding="UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>所有小说管理页面</title>
    <link rel="icon" href="favicon.ico" type="image/ico">
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link href="static/css/bootstrap.min.css" rel="stylesheet">
    <link href="static/css/materialdesignicons.min.css" rel="stylesheet">
    <!--标签插件-->
    <link rel="stylesheet" href="static/js/jquery-tags-input/jquery.tagsinput.min.css">
    <link href="static/css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">

        <!--页面主要内容-->
        <main>

            <div class="container-fluid">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">

                                <div class="table-responsive">
                                    <table class="table table-hover">
                                        <thead>
                                        <tr>
                                            <th>#</th>
                                            <th>章节名称</th>
                                            <th>章数</th>
                                            <th>小说内容</th>
                                            <th>所属小说的id</th>
                                            <th>更新时间</th>
                                        </tr>

                                        <c:forEach items="${sessionScope.allCh}" var="oneCh">
                                            <tr>
                                                <th>${oneCh.chapterId}</th>
                                                <th>${oneCh.chapterName}</th>
                                                <th>${oneCh.chapterNum}</th>
                                                <th>${oneCh.content}</th>
                                                <th>${oneCh.novelId}</th>
                                                <th>${oneCh.updateTime}</th>

                                                <c:set var="novelId" value="${oneCh.novelId}" scope="session"/>
                                                <th><a href="/doChapterDelete???=${oneCh.chapterId}">删除</a></th> <th><a href="/jspServlet?chapterId=${oneCh.chapterId}&novelId=${oneCh.novelId}">修改</a></th>
                                            </tr>
                                        </c:forEach>
                                        </thead>
                                    </table>
                                    <div class="form-group col-md-12">
                                        <button type="button" onclick="window.location.href='/admin/chapterAdd.jsp'" class="btn btn-primary ajax-post" target-form="add-form">添加新小说</button>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                </div>

            </div>


        </main>
        <!--End 页面主要内容-->
    </div>
</div>


<script type="text/javascript" src="static/js/jquery.min.js"></script>
<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="static/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="static/js/main.min.js"></script>
</body>
</html>
